package com.lotus.lqmp.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lotus.lqmp.base.biz.bean.PageQuery;
import com.lotus.lqmp.service.controller.vo.req.BizModifyRecordQueryReq;
import com.lotus.lqmp.service.dao.BizModifyRecordMapper;
import com.lotus.lqmp.service.dao.entity.BizModifyRecordDo;
import com.lotus.lqmp.service.service.BizModifyRecordService;
import com.lotus.platform.common.biz.impl.BaseBiz;
import com.lotus.platform.common.model.enums.DeletedStatusEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 交付物变更记录表Service业务层处理
 * @author Shiheng.Liu1
 * @date 2022-03-29
 */
@Service
public class BizModifyRecordServiceImpl extends BaseBiz<BizModifyRecordMapper, BizModifyRecordDo>
    implements BizModifyRecordService {
    @Autowired
    private BizModifyRecordMapper bizModifyRecordMapper;

    @Override
    public Page<BizModifyRecordDo> queryForPage(PageQuery<BizModifyRecordQueryReq> queryInfo) {
        QueryWrapper<BizModifyRecordDo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("biz_type", queryInfo.getQueryInfo().getBizType());
        Page<BizModifyRecordDo> page = new Page<>(queryInfo.getPageNum(), queryInfo.getPageSize());
        return bizModifyRecordMapper.selectPage(page, queryWrapper);
    }
}
